package com.graduate.twentyone.service.Impl;

import com.graduate.twentyone.domain.Users;
import com.graduate.twentyone.mapper.UsersMapper;
import com.graduate.twentyone.service.UsersService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.yaml.snakeyaml.events.Event;

import java.util.List;

@Service
public class UsersServiceImpl implements UsersService {

    @Autowired
    private UsersMapper usersMapper;

    @Override
    public Integer addOne(Users users) {
        return usersMapper.addOne(users);
    }

    @Override
    public Boolean addPremiss(Integer uid, Integer rid) {
        return usersMapper.addPremiss(uid, rid);
    }

    @Override
    public Boolean queryPremiss(Integer uid) {
        return usersMapper.queryPremiss(uid);
    }

    @Override
    public Boolean updatePremiss(Integer rid, Integer uid) {
        return usersMapper.updatePremiss(rid, uid);
    }

    @Override
    public Boolean deleteOneUser(Integer uid) {
        return usersMapper.deleteOneUser(uid);
    }

    @Override
    public Boolean updateUser(Users users) {
        return usersMapper.updateUser(users);
    }

    @Override
    public List<Users> selectUsers() {
        return usersMapper.selectUsers();
    }

    @Override
    public Users selectooo(){
        return usersMapper.selectooo();
    }

    @Override
    public  Users selectbyUid(Integer uid){
        return usersMapper.selectbyUid(uid);
    }

    @Override
    public  Integer setOnline(Users users){
        return usersMapper.setOnline(users);
    }

    @Override
    public  List<Users> selectOnlineStatus(){
        return usersMapper.selectOnlineStatus();
    }
}
